<template name="merchant">
  <div class="s7-merchant-nav">
    <div class="s7-sort" id="zh-sort">
      <a href="#" class="external">综合排序</a>
    </div>
    <div class="s7-sort" id="buy-sort" style="border-left:1px solid #ddd;border-right:1px solid #ddd;">
      <a href="#" class="external">销量最高</a>
    </div>
    <div class="s7-sort" id="jl-sort">
      <a href="#" class="external">距离最近</a>
    </div>
  </div>
  <div class="list-block media-list s7-list-top">
    {{#if notEmpety}}
    <ul>
        {{#each merList}}
          <li class="s7-list-li">
            <div class="item-link item-content" style="align-items:flex-start">
              <a href="/merchantDetail/{{id}}" class="external">
                <div class="item-media s7-merchant-list-img">
                  <img src="{{list_image.path}}" width="70px" height="70px">
                </div>
              </a>
              <div class="item-inner s7-item-inner" style="padding-top:5px !important">
                <a href="/merchantDetail/{{id}}" class="external">
                  <div class="item-title">
                    <div class="s7-item-title-c">
                      <div class="item-title s7-merchant-title">{{name}}</div>
                      <div class="item-after s7-merchant-item-after">
                        <!-- <span class="s7-m">
                          {{>star stars = stars s_size = 13}}
                        </span> -->
                        <span class="s7-m">月销量:{{month_order_count}}</span>
                        <span class="s7-m-top" style="color:#D84C29 !important">&nbsp;{{labels}}</span>
                      </div>
                    </div>
                  </div>
                  <div class="item-subtitle"></div>
                  <div class="item-text" style="height:21px;width:100%">
                    {{#if cate}}
                    <span class="s7-cate-label">{{cate}}</span>
                    {{else}}
                    <span></span>
                    {{/if}}
                    &nbsp;
                    <span style="font-size:11px !important">{{site_name}}</span>
                    <span class="s7-address-label" style="float:right;margin-left:4px">{{jl}}</span>
                  </div>
                </a>
                <a href="/merchantBuy?merchant_id={{id}}" class="external">
                  <div class="s7-item-bottom">
                    <span class="s7-buy-label s7-color-or">买</span>
                    <span class="s7-buy-detail">
                      {{#if idle.discount}}
                      买单{{dis idle.discount}}折&nbsp;&nbsp;{{idle.start}}点到{{idle.end}}点
                      {{else}}
                      快速买单
                      {{/if}}
                    </span>
                  </div>
                </a>
                {{#each coupons}}
                <div class="s7-item-extend">
                  <span class="s7-coupon-label">{{type_cn}}</span>
                  <span class="s7-buy-detail">{{des}}</span>
                </div>
                {{/each}}
              </div>
            </div>
          </li>
        {{/each}}
    </ul>
    {{else}}
    {{>noData}}
    {{/if}}
  </div>
</template>
